Contents | Index | < Browse | Browse >
LETTERfflushULETTER
Write and flush file output buffer.
Overview
#include <stdio.h>
r = fflush(fp);
int r; // result
FILE *fp; // file pointer
Portability
ANSI
Description
Any data currently in the file's buffers will be written and the buffers will
be cleared. "fflush" has no effect on input file handles. Pass a zero as
argument and all currently open files will be flushed.
Returns
If an error occured, -1 ("EOF") returned. The error code can then be found
in the "errno" variable.
See also
fclose , fopen , setbuf , setvbuf